class Solution {
    public int minArray(int[] numbers) {
        if(numbers.length == 1) {
            return numbers[0];
        } 
        int num = 0;
        for(int i = numbers.length-1;i > 0;i--) {
            if(numbers[i] < numbers[i-1]) {
                num = numbers[i];
                break;
            }
            if((i-1)==0) {
                num = numbers[0];
            }
        }
        return num;
    }
}